package or.exa.cangguan.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import or.exa.cangguan.common.Result;
import or.exa.cangguan.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.Map;

@Slf4j
@Api(tags = "验证码")
@RestController
public class VerificationCodeController {

    @Autowired
    private LoginService loginService;


    @ApiOperation(value = "获取验证码")
    @GetMapping("/login/verificationCode")
    public Result getVerificationCode() throws IOException {

        Map<String, String> stringStringMap = loginService.VerificationCode();

        return Result.ok(stringStringMap);
    }



}
